using System;
using System.Collections.Generic;
using System.Text;

using Peradigm.Framework.Domain.Security;
using Peradigm.Framework.Persistence;

using Liberty.Domain.CaseManagement;
using Liberty.Domain.GrantManagement;
using Liberty.Domain.ServiceMemberManagement;

namespace Liberty.Domain.Kernel
{
    [Serializable]
    public class Event : PersistentModel
    {
        #region Constants
        #endregion

        #region Event Handlers
        #endregion

        #region Methods

        #endregion

        #region Properties        
        public Activity Activity
        {
            get
            {
                return i_Activity;
            }
            set
            {
                i_Activity = value;
            }
        }

        public User CompletedBy
        {
            get { return i_CompletedBy; }
            set { i_CompletedBy = value; }
        }

        public string Note
        {
            get
            {
                return i_Note;
            }
            set
            {
                i_Note = value;
            }
        }

        public DateTime OccuredOn
        {
            get
            {
                return i_OccurredOn;
            }
            set
            {
                i_OccurredOn = value;
            }
        }
        #endregion

        #region Private Methods
        #endregion

        #region Private Properties
        #endregion

        #region Construction and Finalization
        /// <summary>
        /// Creates a stubbed event populated with frequently used primitives.  
        /// Other aggregated objects are not populated by this factory method.
        /// </summary>
        /// <returns></returns>
        public static Event TestInstance()
        {
            Event stub = new Event();
            stub.OccuredOn = DateTime.Now;
            stub.Note = "Some notes in the Notes Description.  Should this be a Note object??";
            stub.OccuredOn = DateTime.Now;
            stub.Oid = 12L;

            return stub;
        }
        
        public Event()
        {
        }

        public Event( User user, Activity action, string notes )
            : this( PersistentModel.NEW_OID, PersistentModel.NEW_VERSION, user, action, notes )
        {
        }

        public Event( long oid, byte[] rowLock, User user, Activity action, string notes )
            : base( oid, rowLock )
        {
            this.CompletedBy = user;
            this.Activity = action;
            this.Note = notes;
            this.OccuredOn = DateTime.Now;
        }
        #endregion

        #region Data Elements
        private Activity i_Activity;
        private User i_CompletedBy;
        private string i_Note;
        private DateTime i_OccurredOn;
        #endregion
    }
}
